package Display;

import java.awt.*;

import javax.swing.*;

public class ContentsDisplay extends JPanel {
	private LeftDisplay leftDisplay;
	private RightDisplay rightDisplay;
	
	private JPanel lrDisplay;
	private JPanel allDisplay;
	
	public ContentsDisplay() {
		setLayout(new BorderLayout());
		
		leftDisplay = new LeftDisplay();
		rightDisplay = new RightDisplay();
		
		lrDisplay = new JPanel();
		lrDisplay.setLayout(new GridLayout(1, 2, 15, 0));
		
		allDisplay = new JPanel();
		allDisplay.setLayout(new BorderLayout());
		
		JSeparator separatorNorth = new JSeparator(JSeparator.HORIZONTAL);
		separatorNorth.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorNorth, BorderLayout.NORTH);
		
		JSeparator separatorSouth = new JSeparator(JSeparator.HORIZONTAL);
		separatorSouth.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorSouth, BorderLayout.SOUTH);
		
		JSeparator separatorWest = new JSeparator(JSeparator.VERTICAL);
		separatorWest.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorWest, BorderLayout.WEST);
		
		JSeparator separatorEast = new JSeparator(JSeparator.VERTICAL);
		separatorEast.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorEast, BorderLayout.EAST);
		
	//	leftDisplay.setBackground(Color.CYAN);
		lrDisplay.add(leftDisplay);
		
	//	rightDisplay.setBackground(Color.pink);
		lrDisplay.add(rightDisplay);
		
		allDisplay.add(lrDisplay, BorderLayout.CENTER);
		
		add(allDisplay);
	}
	public ContentsDisplay(LeftDisplay _leftDisplay) {
		setLayout(new BorderLayout());
		
		leftDisplay = new LeftDisplay();
		this.leftDisplay = _leftDisplay;
		rightDisplay = new RightDisplay();
		
		lrDisplay = new JPanel();
		lrDisplay.setLayout(new GridLayout(1, 2, 15, 0));
		
		allDisplay = new JPanel();
		allDisplay.setLayout(new BorderLayout());
		
		JSeparator separatorNorth = new JSeparator(JSeparator.HORIZONTAL);
		separatorNorth.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorNorth, BorderLayout.NORTH);
		
		JSeparator separatorSouth = new JSeparator(JSeparator.HORIZONTAL);
		separatorSouth.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorSouth, BorderLayout.SOUTH);
		
		JSeparator separatorWest = new JSeparator(JSeparator.VERTICAL);
		separatorWest.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorWest, BorderLayout.WEST);
		
		JSeparator separatorEast = new JSeparator(JSeparator.VERTICAL);
		separatorEast.setBackground(Color.DARK_GRAY);
		allDisplay.add(separatorEast, BorderLayout.EAST);
		
	//	leftDisplay.setBackground(Color.CYAN);
		lrDisplay.add(leftDisplay);
		
	//	rightDisplay.setBackground(Color.pink);
		lrDisplay.add(rightDisplay);
		
		allDisplay.add(lrDisplay, BorderLayout.CENTER);
		
		add(allDisplay);
	}
	public void setContendsDisplay(LeftDisplay _leftDisplay) {
		this.leftDisplay = _leftDisplay;
	}
	
}
